package com.jinghao.ctws.controller;

import java.util.Map;

import javax.annotation.Resource;

import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.jinghao.ctws.service.ICwvPublicService;
import com.jinghao.sys.entity.SysAccount;

@Controller
@Scope("prototype")
@RequestMapping(value = "/public/ctws")
public class CwvPublicController {
	//==================定制内容开始======================
	@Resource
	public ICwvPublicService cwvPublicService;
//在这里修改代码
	/**
	 * 仓库账户公共登录
	 * @param model 
	 * @return
	 */
	@ResponseBody
	@RequestMapping(value = "/login", method = RequestMethod.POST)  
	public Map<String, Object>  updateloginByUserAndPwd(@ModelAttribute("model") SysAccount model) throws Exception{
        this.cwvPublicService.updateloginByUserAndPwd(model);
        model.setMssage("登录成功！");
        return model.getSingleJson();  
	}
	//==================定制内容结束======================
	 
}
